package com.ssmTmp.controller;

import com.ssmTmp.annotation.UserAccess;
import com.ssmTmp.api.web.ApiResponse;
import com.ssmTmp.api.web.ResponseUtil;
import com.ssmTmp.pojo.Enums.EmUserAccess;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author huangz
 * @Title: TestController
 * @ProjectName zjmsa_oa
 * @Description: 测试
 * @date 2018/10/22 17:41
 */
@RestController
@Api(tags = "测试", description = "测试")
@Validated
public class TestController {


    @GetMapping(value = "/test")
    @ApiOperation(value = "测试", notes = "测试")
    public ApiResponse uploadFile(@NotBlank(message = "test参数不能为空") String test) {
        return ResponseUtil.done("成功");
    }

    @GetMapping(value = "/qq/{test}")
    @UserAccess
    @ApiOperation(value = "测试", notes = "测试")
    public String qq(@PathVariable("test") String test) {
        System.out.println(test);
        return "发送成功";
    }


}
